#ifndef __DATA_TANS_H
#define __DATA_TANS_H	 
#include "sys.h"


#define BYTE0(dwTemp)       (*(char *)(&dwTemp))
#define BYTE1(dwTemp)       (*((char *)(&dwTemp) + 1))
#define BYTE2(dwTemp)       (*((char *)(&dwTemp) + 2))
#define BYTE3(dwTemp)       (*((char *)(&dwTemp) + 3))



extern u8 Send_PID1,Send_PID2;
void usart2_send_char(u8 c);
void Uart2_Put_Buf(uint8_t *data_to_send,u8 num);
void Data_Send_Status(float roll,float pitch,float yaw);
void Data_Send_Senser(short aacx,short aacy,short aacz,short gyrox,short gyroy,short gyroz,u16 high);
void Data_Send_MotoPWM(u16 Moto_PWM_1,u16 Moto_PWM_2,u16 Moto_PWM_3,u16 Moto_PWM_4,u16 Moto_PWM_5,u16 Moto_PWM_6);

void Data_Send_Check(u16 check);
void send_at_cmd(uint8_t *cmd);
void Data_Send_PID1(void);
void Data_Send_PID2(void);
void Data_Receive_Anl(u8 *data_buf,u8 num);
		 				    
#endif
